<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@  taglib  uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="head/css/head.css" />
</head>

<body>
	<div class="top">
		<div class="con">
			<c:if test="${not  empty  user }">
			<div class="head_left">您好,欢迎来到天天果园！</div>

			<div class="head_left">您好,欢迎来到天天果园！</div>
			</c:if>
			<c:if test="${user eq null}">
			<div class="head_right noLink">
				<a href="login.jsp">[ 登陆 ]</a>&nbsp;&nbsp; <a href="reg.jsp">[
					注册<span style="color: red;font-size: 12px;">有惊喜</span> ]
				</a>
			</div>
			</c:if>
			<c:if test="${not  empty  user }">
			  <div class="toStar"><a href="/fruits/star/ShowStarsByUidServlet?uid=${user.uid}">我的关注</a></div>
			  <div class="head_left"><a href="/fruits/user/LogoutServlet">退出</a></div>
			  <div class="head_left"><span>当前用户：${user.username }</span></div>
			</c:if>
          
		</div>
	</div>

	<%--网站图标、搜索框、购物车--%>
	<div class="head">
		<div class="con">

			<div class="logo">
				<a href="http://www.taobao.com"> <img src="head/imgs/fdaylogo.png"
					alt="天天果园-水果网购首选品牌，水果，我们只挑有来头的！" />
				</a>
			</div>

			<div class="ser">
				<form action="/fruits/fruit/GetFruitsByNameServlet"
					method="post">
					<input type="text" name="fname" id="ser_border" value="" /> <input
						type="submit" name="ser_button" id="ser_button" value="搜索" />
				</form>
			</div>
			<c:if test="${not empty  user }">
			<div class="shopcart">		
				<div class="cart_img"></div>
				<div class="cart">
					<a href="showcart.jsp">>我的购物车</a>
					<c:if test="${cartcount !=0 }">
						<div class="cart_num" id="cart_num">${cartcount }</div>
					</c:if>
					
				</div>
				<div class="cart_to">></div>
			</div>
			</c:if>
		</div>
	</div>

	<%--网站菜单--%>
	<div class="head_menu">
		<div class="con">
			<ul class="hmenu_ul">
				<li><a href="index.jsp">首页</a></li>
				<li><a href="/fruits/fruit/GetFruitsServlet">全部商品</a></li>
				<li><a href="/fruits/fruit/GetEntranceFruitServlet?fentrance=true">进口水果</a></li>
				<li><a href="/fruits/fruit/GetEntranceFruitServlet?fentrance=false">国货</a></li>
			</ul>
		</div>
	</div>

</body>
</html>
